<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'DejaVu Sans'; font-size:11pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:10px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:xx-large; font-weight:600;">VBA Excel. Метод Application.Goto</span></p>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Переход к заданному диапазону или к процедуре VBA в любой открытой книге Excel с помощью метода Application.Goto, неактивная книга активируется.</span></p>
<p style=" margin-top:32px; margin-bottom:6px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#fafafa;"><span style=" font-weight:600; color:#333333;">Содержание</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://vremya-ne-zhdet.ru/vba-excel/metod-application-goto/#Metod_ApplicationGoto"><span style=" text-decoration: underline; color:#0000ff;">1. Метод Application.Goto</span></a></p>
<p style=" margin-top:2px; margin-bottom:0px; margin-left:14px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://vremya-ne-zhdet.ru/vba-excel/metod-application-goto/#Sintaksis"><span style=" text-decoration: underline; color:#0000ff;">1.1. Синтаксис</span></a></p>
<p style=" margin-top:2px; margin-bottom:0px; margin-left:14px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://vremya-ne-zhdet.ru/vba-excel/metod-application-goto/#Parametry"><span style=" text-decoration: underline; color:#0000ff;">1.2. Параметры</span></a></p>
<p style=" margin-top:2px; margin-bottom:0px; margin-left:14px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://vremya-ne-zhdet.ru/vba-excel/metod-application-goto/#Primecania"><span style=" text-decoration: underline; color:#0000ff;">1.3. Примечания</span></a></p>
<p style=" margin-top:2px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://vremya-ne-zhdet.ru/vba-excel/metod-application-goto/#Primery"><span style=" text-decoration: underline; color:#0000ff;">2. Примеры</span></a></p>
<p style=" margin-top:2px; margin-bottom:0px; margin-left:14px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://vremya-ne-zhdet.ru/vba-excel/metod-application-goto/#ApplicationGoto_dla_aktivnoj_knigi"><span style=" text-decoration: underline; color:#0000ff;">2.1. Application.Goto для активной книги</span></a></p>
<p style=" margin-top:2px; margin-bottom:0px; margin-left:14px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://vremya-ne-zhdet.ru/vba-excel/metod-application-goto/#ApplicationGoto_dla_luboj_knigi"><span style=" text-decoration: underline; color:#0000ff;">2.2. Application.Goto для любой книги</span></a></p>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="Metod_ApplicationGoto"></a><span style=" font-size:x-large; font-weight:600;">М</span><span style=" font-size:x-large; font-weight:600;">етод Application.Goto</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#f0f0f0;"><span style=" background-color:#f0f0f0;">Application.Goto — это метод, который активирует указанную книгу, если она неактивна, и выделяет заданный диапазон ячеек или отображает заданную процедуру в редакторе VBA.</span></p>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Если книга Excel в ссылке для перехода не будет указана, выбор диапазона ячеек или процедуры VBA будет осуществлен в активной книге.</p>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="Sintaksis"></a><span style=" font-size:large; font-weight:600;">С</span><span style=" font-size:large; font-weight:600;">интаксис</span></p>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Синтаксис метода Application.Goto:</p>
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:15px; font-family:'Verdana,Arial,sans'; font-size:12px; font-weight:496; background-color:#fdfdfd;"><br /></p>
<table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" cellspacing="2" cellpadding="0">
<tr>
<td bgcolor="#dfefff" style=" vertical-align:top; padding-left:0; padding-right:0; padding-top:0; padding-bottom:0;">
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71ea7068211860"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#5499de;">1</span></p></td>
<td style=" vertical-align:top; padding-left:0; padding-right:0; padding-top:0; padding-bottom:0;">
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71ea7068211860-1"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">A</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">pplication</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">.</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">Goto</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">Reference</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">,</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">Scroll</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">)</span></pre></td></tr></table>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="Parametry"></a><span style=" font-size:large; font-weight:600;">П</span><span style=" font-size:large; font-weight:600;">араметры</span></p>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Параметры метода Application.Goto:</p>
<table border="1" style=" margin-top:0px; margin-bottom:20px; margin-left:0px; margin-right:0px;" cellspacing="2" cellpadding="0"><thead>
<tr>
<td width="30%" bgcolor="#eaeaea" style=" padding-left:20; padding-right:20; padding-top:20; padding-bottom:10;">
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; background-color:#eaeaea;">Параметр</span></p></td>
<td width="70%" bgcolor="#eaeaea" style=" padding-left:20; padding-right:20; padding-top:20; padding-bottom:10;">
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; background-color:#eaeaea;">Описание</span></p></td></tr></thead>
<tr>
<td bgcolor="#fff7ec" style=" padding-left:20; padding-right:20; padding-top:20; padding-bottom:20;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" background-color:#fff7ec;">Reference</span></p></td>
<td bgcolor="#fff7ec" style=" padding-left:20; padding-right:20; padding-top:20; padding-bottom:20;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" background-color:#fff7ec;">Ссылка на объект Range или на процедуру VBA. Необязательный параметр. Если этот аргумент опущен, будет отображен последний диапазон, выбранный методом Goto или вручную.</span></p></td></tr>
<tr>
<td bgcolor="#fff7ec" style=" padding-left:20; padding-right:20; padding-top:20; padding-bottom:20;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" background-color:#fff7ec;">Scroll</span></p></td>
<td bgcolor="#fff7ec" style=" padding-left:20; padding-right:20; padding-top:20; padding-bottom:20;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" background-color:#fff7ec;">Задает способ прокрутки выбранного диапазона:</span></p>
<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:30px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">True</span> — верхний левый угол диапазона прокручивается до верхнего левого угла окна.</li>
<li style=" margin-top:10px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">False</span> — выбранный диапазон отображается в нижней часть окна.</li></ul>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Необязательный параметр. Значение по умолчанию — <span style=" font-weight:600;">False</span>.</p></td></tr></table>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="Primecania"></a><span style=" font-size:large; font-weight:600;">П</span><span style=" font-size:large; font-weight:600;">римечания</span></p>
<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" background-color:#c8fbc8;" style=" margin-top:10px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Заданный диапазон можно выделить с помощью метода Range.Select, но он не работает с прокруткой листа.</li>
<li style=" margin-top:10px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">При использовании метода Application.Goto для выделения диапазона ячеек, предыдущие выборы сохраняются (до 4 выборов)*.</li>
<li style=" margin-top:10px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Тесты показали, что методы Application.Goto и Range.Select не работают со свернутыми книгами (Application.WindowState = xlMinimized).</li></ul>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">* Просмотреть сохраненные выборы диапазонов ячеек методом Application.Goto можно с помощью свойства Application.PreviousSelections:</span></p>
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:15px; font-family:'Verdana,Arial,sans'; font-size:12px; font-weight:496; background-color:#fdfdfd;"><br /></p>
<table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" cellspacing="2" cellpadding="0">
<tr>
<td bgcolor="#dfefff" style=" vertical-align:top; padding-left:0; padding-right:0; padding-top:0; padding-bottom:0;">
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="aswift_1_host"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#5499de;">1</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#c8e1fa;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#317cc5; background-color:#c8e1fa;">2</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#5499de;">3</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#c8e1fa;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#317cc5; background-color:#c8e1fa;">4</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#5499de;">5</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#c8e1fa;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#317cc5; background-color:#c8e1fa;">6</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#5499de;">7</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#c8e1fa;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#317cc5; background-color:#c8e1fa;">8</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#5499de;">9</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#c8e1fa;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#317cc5; background-color:#c8e1fa;">10</span></p></td>
<td style=" vertical-align:top; padding-left:0; padding-right:0; padding-top:0; padding-bottom:0;">
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71eb6903565625-1"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">S</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">ub</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">PrevSel</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">()</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#f7f7f7;"><a name="urvanov-syntax-highlighter-64fa31de71eb6903565625-2"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">D</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">im</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#000000;">i</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">As</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">Byte</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71eb6903565625-3"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">O</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">n </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">Error</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">GoTo</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">Instr</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#f7f7f7;"><a name="urvanov-syntax-highlighter-64fa31de71eb6903565625-4"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">   </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">For</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">i</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> = </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">LBound</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">Application</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">.</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">PreviousSelections</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">)</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">To</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">UBound</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">Application</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">.</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">PreviousSelections</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">)</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71eb6903565625-5"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;">       </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">MsgBox </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">Application</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">.</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">PreviousSelections</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">i</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">).</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">Address</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#f7f7f7;"><a name="urvanov-syntax-highlighter-64fa31de71eb6903565625-6"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">   </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">Next</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#000000;">i</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71eb6903565625-7"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">E</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">xit</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">Sub</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#f7f7f7;"><a name="urvanov-syntax-highlighter-64fa31de71eb6903565625-8"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">I</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">nstr</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;">:</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71eb6903565625-9"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;">   </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#000000;">MsgBox</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#008000;">&quot;Предыдущих выборов нет&quot;</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#f7f7f7;"><a name="urvanov-syntax-highlighter-64fa31de71eb6903565625-10"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">E</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">nd</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">Sub</span></pre></td></tr></table>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="Primery"></a><span style=" font-size:x-large; font-weight:600;">П</span><span style=" font-size:x-large; font-weight:600;">римеры</span></p>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="ApplicationGoto_dla_aktivnoj_knigi"></a><span style=" font-size:large; font-weight:600;">A</span><span style=" font-size:large; font-weight:600;">pplication.Goto для активной книги</span></p>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Переход к заданному диапазону или к процедуре VBA в активной книге Excel:</p>
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:15px; font-family:'Verdana,Arial,sans'; font-size:12px; font-weight:496; background-color:#fdfdfd;"><br /></p>
<table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" cellspacing="2" cellpadding="0">
<tr>
<td bgcolor="#dfefff" style=" vertical-align:top; padding-left:0; padding-right:0; padding-top:0; padding-bottom:0;">
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71ebf968373371"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#5499de;">1</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#c8e1fa;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#317cc5; background-color:#c8e1fa;">2</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#5499de;">3</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#c8e1fa;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#317cc5; background-color:#c8e1fa;">4</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#5499de;">5</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#c8e1fa;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#317cc5; background-color:#c8e1fa;">6</span></p></td>
<td style=" vertical-align:top; padding-left:0; padding-right:0; padding-top:0; padding-bottom:0;">
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71ebf968373371-1"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#ff8000;">'</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#ff8000;">Отображение процедуры &quot;Test&quot;, расположенной в &quot;Module1&quot; активной книги</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#f7f7f7;"><a name="urvanov-syntax-highlighter-64fa31de71ebf968373371-2"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">A</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">pplication</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">.</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">Goto</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#008000;">&quot;Module1.Test&quot;</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71ebf968373371-3"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#000000;"> </span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#f7f7f7;"><a name="urvanov-syntax-highlighter-64fa31de71ebf968373371-4"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#ff8000;">'</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#ff8000;">Выделение диапазона</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71ebf968373371-5"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">A</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">pplication</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">.</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">Goto</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">Sheets</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#008000;">&quot;Лист1&quot;</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">).</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">Range</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#008000;">&quot;A40:E50&quot;</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">)</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#f7f7f7;"><a name="urvanov-syntax-highlighter-64fa31de71ebf968373371-6"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">A</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">pplication</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">.</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">Goto</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">Sheets</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#008000;">&quot;Лист1&quot;</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">).</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">Range</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#008000;">&quot;A40:E50&quot;</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">),</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">True</span></pre></td></tr></table>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="ApplicationGoto_dla_luboj_knigi"></a><span style=" font-size:large; font-weight:600;">A</span><span style=" font-size:large; font-weight:600;">pplication.Goto для любой книги</span></p>
<p style=" margin-top:0px; margin-bottom:30px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Переход к заданному диапазону или к процедуре VBA в любой открытой книге Excel:</p>
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:15px; font-family:'Verdana,Arial,sans'; font-size:12px; font-weight:496; background-color:#fdfdfd;"><br /></p>
<table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" cellspacing="2" cellpadding="0">
<tr>
<td bgcolor="#dfefff" style=" vertical-align:top; padding-left:0; padding-right:0; padding-top:0; padding-bottom:0;">
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71ec3450230114"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#5499de;">1</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#c8e1fa;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#317cc5; background-color:#c8e1fa;">2</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#5499de;">3</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#c8e1fa;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#317cc5; background-color:#c8e1fa;">4</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#5499de;">5</span></p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#c8e1fa;"><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#317cc5; background-color:#c8e1fa;">6</span></p></td>
<td style=" vertical-align:top; padding-left:0; padding-right:0; padding-top:0; padding-bottom:0;">
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71ec3450230114-1"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#ff8000;">'</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#ff8000;">Отображение процедуры &quot;Test&quot;, расположенной в &quot;Module1&quot; книги &quot;Книга2.xlsm&quot;</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#f7f7f7;"><a name="urvanov-syntax-highlighter-64fa31de71ec3450230114-2"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">A</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">pplication</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">.</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">Goto</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#008000;">&quot;Книга2.xlsm!Module1.Test&quot;</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71ec3450230114-3"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#000000;"> </span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#f7f7f7;"><a name="urvanov-syntax-highlighter-64fa31de71ec3450230114-4"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#ff8000;">'</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#ff8000;">Выделение диапазона</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="urvanov-syntax-highlighter-64fa31de71ec3450230114-5"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">A</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">pplication</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">.</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">Goto</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">Workbooks</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#008000;">&quot;Книга2.xlsm&quot;</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">).</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">Sheets</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#008000;">&quot;Лист1&quot;</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">).</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">Range</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#008000;">&quot;A40:E50&quot;</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">)</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#f7f7f7;"><a name="urvanov-syntax-highlighter-64fa31de71ec3450230114-6"></a><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">A</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#002d7a;">pplication</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">.</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">Goto</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">Workbooks</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#008000;">&quot;Книга2.xlsm&quot;</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">).</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">Sheets</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#008000;">&quot;Лист1&quot;</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">).</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#004ed0;">Range</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">(</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#008000;">&quot;A40:E50&quot;</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#333333;">),</span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#006fe0;"> </span><span style=" font-family:'inherit'; font-size:12px; font-weight:496; color:#800080;">True</span></pre></td></tr></table></body></html>